home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / manual-p / olxvman.tgz / olxvman.tar / olxvman / _install / install_unbundled_RE < prev   
Text File  |  1990-12-18  |  37KB  |  1,334 lines

  1. #! /bin/sh
  2. #set -x
  3. #
  4. # @(#)4.5_Template   4.5   10/11/90     
  5. #    Copyright (c) 1990, Sun Microsystems, Inc.  All Rights Reserved.
  6. #    Sun considers its source code as an unpublished, proprietary
  7. #    trade secret, and it is available only under strict license
  8. #    provisions.  This copyright notice is placed here only to protect
  9. #    Sun in the event the source is deemed a published work.  Dissassembly,
  10. #    decompilation, or other means of reducing the object code to human
  11. #    readable form is prohibited by the license agreement under which
  12. #    this code is provided to the user or company in possession of this
  13. #    copy.
  14. #
  15. # RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the 
  16. # Government is subject to restrictions as set forth in subparagraph 
  17. # (c)(1)(ii) of the Rights in Technical Data and Computer Software 
  18. # Clause at DFARS 252.227-7013 (Oct. 1988) and FAR 52.227-19 (c) 
  19. # (June 1987). Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain 
  20. # View, California 94043   
  21. #
  22. # Name: 4.5_Template
  23. #
  24. # Description: 
  25. # It is called from the script "install_unbundled".
  26. # This is the unbundled installation script template.  It contains features
  27. # that were compiled from various groups requests.
  28. # The variables have been separated into the file install_parameters.
  29. # Read the comments in install_parameters to determine how to customize
  30. # the scripts for your product.
  31. #
  32. # USAGE:
  33. #       4.5_Template [-dDEVICE]  [-rREMOTE_HOST]  [-mMOUNT_POINT] [-pPRODUCT_NAME] [-DEFAULT]
  34. #
  35. #
  36. #    MOUNT_POINT = Mount point of CD-ROM
  37. #    PRODUCT_NAME = Product directory on CD-ROM to install from
  38. #    DEVICE = media device
  39. #    REMOTE_HOST = host of remote tape drive
  40. #    DEFAULT = use all default values
  41. #
  42. #
  43. #  History:  updated   peggy jenq     4/6/90
  44. #                      jdk - contains support for CDrom installation 9/7/90
  45. #            updated   peggy jenq     10/11/90 - bug fix 
  46. #
  47. #
  48. #####################################################
  49. #####  Static Variables (Do not change these) #######
  50. #####################################################
  51. # Install directory and Log file for installation
  52. PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc
  53. export PATH
  54. PARAM_FILE="install_parameters"
  55. SH_NAME=`basename ${0}`
  56. install_dir="/usr/tmp/unbundled" 
  57. LOGFILE="${install_dir}/$SH_NAME.log"
  58. # This is the online software list, updated after each successfull installation
  59. UNBUNDLED_INVENTORY="${install_dir}/Unbundled_Inventory"
  60.  
  61. ################################################################
  62. # RUN_TIME VARIABLES (determined by environment or user input) #
  63. ################################################################
  64. # Operating System
  65. SOS_LEVEL=`strings /vmunix \
  66.         | egrep '^Sun UNIX|^SunOS (Release)' \
  67.         | sed -e 's/.*Release \([^ ][^ ]*\) .*/\1/'`
  68. # Just the OS release number, with decimal point, but w/o ALPHA/BETA/whatever.
  69. SOS_RELEASE=`echo $SOS_LEVEL | sed -e 's/[a-zA-Z].*//'`
  70. # Strip the decimal out of release number
  71. SOS_NUMERIC=`echo $SOS_LEVEL | sed -e 's/\.//'` 
  72. # Strip out any alpha characters (e.g. 40BETA)
  73. SOS_NUMERIC=`expr substr $SOS_NUMERIC 1 2` 
  74. # login of installer
  75. INSTALLER=`whoami`
  76.  
  77. # host machine architecture
  78. #ARCH=`arch -k`
  79. ARCH=`arch`
  80.  
  81. # available disk space
  82. DISK_AVAIL=`df $DESTDIR | awk '/\$DESTDIR/ {print $4 }'`
  83.  
  84. # standalone installation
  85. STANDALONE="N"
  86.  
  87. # server installation
  88. SERVER=""
  89. #########################
  90. # Other Misc. variables #
  91. #########################
  92. CD="cd"
  93. DD="dd"
  94. MT="mt"
  95. TAR="tar"
  96. BAR="bar"
  97.  
  98. TAPE_LOC=""
  99. REMOTE_HOST=""
  100. REMOTE=0
  101. DEFAULT=0
  102. DEV_SPEC=0
  103. Pre=0
  104. USAGE="$SH_NAME [-dDEVICE]  [-rREMOTE_HOST]  [-mMOUNT_POINT] [-pPRODUCT_NAME] [-DEFAULT] "
  105. ANS=""
  106. DISK=0
  107. #    Directory Name of Mount point
  108. MOUNT_POINT=""
  109.  
  110. #    Indicates CD-ROM is mounted
  111. DEVICEISMOUNTED=0
  112.  
  113. #    Indicates CD-ROM is to be used for installation
  114. CDROM=0
  115.  
  116. #    Indicates mount point has been specified
  117. DEV_MP=0
  118.  
  119. #    Directory Name of product to be installed
  120. PRODUCT_NAME=""
  121.  
  122. #    Indicates product directory has been specified
  123. PRODUCT=0
  124.  
  125. #    Indicates environment variable for product
  126. CDINSTALLDIR=${INSTALLAPPDIR:-""}
  127.  
  128. #    Indicates script mounted the CD-ROM
  129. PROGMOUNTEDDEVICE=0
  130.  
  131. ##############################
  132. # Function for logging Stdin #
  133. ##############################
  134. stdin_log () {
  135.     read $1
  136.     eval echo \"\$"$1"\" >> $LOGFILE
  137. }
  138.  
  139. ############################################
  140. # Functions for asking yes or no questions #
  141. ############################################
  142. # $1 is a response that causes us to return 0
  143. # $2, $3, ... is the question to ask
  144. yes_or_no(){
  145.     GUDANZER="$1"; shift
  146.     question=
  147.     while [ $# -ge 1 ]
  148.     do
  149.     question="$question
  150. $1"
  151.     shift
  152.     done
  153.     Answer=""
  154.     while [ "$Answer" = "" ]
  155.     do
  156.         echo -n "$question [y|n] "
  157.         stdin_log Answer
  158.         case "$Answer" in
  159.     "$GUDANZER"*)    return 0;;
  160.         [yn]*)        return 1;;
  161.         *)           echo
  162.             echo "Enter \"y\" or \"n\""
  163.                      Answer="";;
  164.         esac
  165.     done
  166. }
  167. says_yes(){
  168.     yes_or_no y "$@"
  169. }
  170. says_no(){
  171.     yes_or_no n "$@"
  172. }
  173.  
  174. ###############################
  175. # Function for building paths #
  176. ###############################
  177. mkpath() {
  178.     path_to_make=
  179.     for i in `echo $1 | tr / ' '`
  180.     do
  181.     path_to_make=$path_to_make/$i
  182.     if [ -d $path_to_make ] || mkdir -p  $path_to_make
  183.     then : the directory exists
  184.     else
  185.         echo
  186.         echo "$SH_NAME: Failed to create destination directory: $DESTDIR"
  187.         echo "    Check permissions."
  188.         return 1
  189.     fi
  190.     done
  191. }
  192.  
  193. ###############################################################
  194. # Function for checking whether or not $DESTDIR is reasonable #
  195. ###############################################################
  196. # DESTDIR and partition is actually interchangeable since the "df" will
  197. # pull out the partition part for space checking.
  198. #
  199. # Returns 0 if okay (and user said to create directory).
  200. # Returns 1 if okay (and no warnings were printed).
  201. # Returns 2 if okay (but warnings were printed).
  202. # Returns 3 if not okay.
  203. space_test () {
  204.     RETURN=1
  205.     DESTDIR=$1
  206.     echo ""
  207.     echo "Currently, the destination directory for the $PRODUCT_NAME: $DESTDIR "
  208.     #
  209.     # Make sure $DESTDIR exists
  210.     #
  211.     if [ ! -d "$DESTDIR" ]
  212.     then
  213.         if says_yes "The destination directory $DESTDIR does not exist." \
  214.             "Do you want to create this directory?"
  215.         then
  216.         mkpath $DESTDIR || return 3
  217.         RETURN=0
  218.         else
  219.         DISK_AVAIL=0
  220.         return 3
  221.         fi
  222.     fi
  223.     #
  224.     # Make sure "$DESTDIR" is in the same partition as any previously
  225.     # specified directories.
  226.     #
  227.     partition=`df $DESTDIR | awk 'NR==2 {x=$6}
  228.                       NR==3 {x=$5}
  229.                       END   {print x}'`
  230.     for i
  231.     do
  232.         i_partition=`df $i | awk 'NR==2 {x=$6}
  233.                       NR==3 {x=$5}
  234.                       END   {print x}'`
  235.         if [ $partition != $i_partition ]
  236.         then
  237.         echo
  238.         echo "The destination directory $DESTDIR is in"
  239.         echo "the filesystem $partition, but the destination"
  240.         echo "directory $i is in the filesystem $i_partition."
  241.         echo 
  242.         echo "All components of $Prod must be installed into the same filesystem."
  243.         return 3
  244.         fi
  245.     done
  246.  
  247.     #
  248.     # Make sure $DESTDIR contains sufficient space
  249.     #
  250.     DISK_AVAIL=`df $DESTDIR | awk 'NR==2 {x=$4}
  251.                        NR==3 {x=$3}
  252.                        END   {print x}'`
  253.     if [ $DISK_AVAIL -lt $SOFT_SIZE ]
  254.     then
  255.         echo
  256.         echo "There is insufficient space available in $partition;"
  257.         echo "$SOFT_SIZE kbytes are required, but only $DISK_AVAIL kbytes are available."
  258.         return 3
  259.     fi
  260.     #
  261.     # Check if $DESTDIR is local or NFS-mounted
  262.     #
  263.     if df $DESTDIR 2>/dev/null | egrep -s '^/dev/'
  264.     then : $DESTDIR is local
  265.     else
  266.         echo
  267.         echo "The destination directory $DESTDIR is in"
  268.         echo "the NFS-mounted filesystem $partition."
  269.         if $LOCAL_FS_ONLY
  270.         then
  271.         echo "You cannot install $PRODUCT_NAME into NFS-mounted filesystems;"
  272.         echo "you can only install onto local filesystems."
  273.         return 3
  274.         fi
  275.         RETURN=2
  276.     fi
  277. #     done
  278.  
  279.     #
  280.     # Check if DESTDIR isn't empty
  281.     #
  282.     if [ "" != "`ls -A $DESTDIR`" ]
  283.     then
  284.         echo
  285.         echo "The destination directory $DESTDIR is not empty."
  286.         echo "It contains:"
  287.         ls -Al $DESTDIR
  288.         RETURN=2
  289.     fi
  290.     return $RETURN
  291. }
  292.  
  293.  
  294. #Set all the unique variables for this product from install_parameters
  295. . ${install_dir}/${PARAM_FILE}
  296. ###################  Begin Installation Script ##############################
  297. echo "$SH_NAME : Begin Installation of $PRODUCT_NAME" >> $LOGFILE
  298.  
  299. # work-around to free up the /tmp space used when uncompressing files with
  300. # the bar command
  301. \rm -f /tmp/tmp_*.Z
  302. ###################################################
  303. #  Added extract_unbundled code here so it works  # 
  304. #  with or without the front-end script.          #
  305. ###################################################
  306. # Parse the arguments
  307. if [ $# -gt 0 ]
  308. then
  309.     for param in $*;
  310.     do
  311.     PARAMS="$PARAMS $param"
  312.         case "$param" in
  313.         -d*)
  314.         DEVROOT=`expr $param : '-d\(.*\)' '|' "1"` 
  315.         if [ $DEVROOT -eq 1 ]
  316.         then
  317.         echo "$SH_NAME : Invalid device name $param"
  318.                 echo "            USAGE : $USAGE"
  319.         exit 1
  320.         fi
  321.         DEV_SPEC=1 ;;
  322.         -r*)
  323.         REMOTE_HOST=`expr $param : '-r\(.*\)' '|' "1"` 
  324.         if [ $REMOTE_HOST -eq 1 ]
  325.         then
  326.         echo "$SH_NAME : Invalid Host name $param"
  327.                 echo "            USAGE : $USAGE"
  328.         exit 1
  329.         fi
  330.             REMOTE=1 ;;
  331.         -m*)
  332.             MOUNT_POINT=`expr  $param : '-m\(.*\)' '|' "1"`
  333.             if [ $MOUNT_POINT -eq 1 ]
  334.             then
  335.                 echo
  336.                 echo "$SH_NAME : Invalid mount point"
  337.                 echo "            USAGE : $USAGE"
  338.                 exit 1
  339.             fi  
  340. # jdk assume that if a mount point is specified, then we are using CDROM, and
  341. # the installation is local
  342.             TAPE_LOC="local"
  343.             DEV_MP=1
  344.             DEVROOT="mounted"
  345.             DEVICEISMOUNTED=1
  346.             OPTIONS="xvfp"
  347.             DEV_SPEC=1;;
  348.        -p*)
  349.            PRODUCT_NAME=`expr  $param : '-p\(.*\)' '|' "1"`
  350.            if [ $PRODUCT_NAME -eq 1 ]
  351.            then
  352.                echo
  353.                echo "$SH_NAME : Invalid product name"
  354.                echo "            USAGE : $USAGE"
  355.                exit 1
  356.            fi
  357.            PRODUCT=1;;
  358.         -DEFAULT)
  359.         STANDALONE="Y"
  360.         DEST_SETABLE="N"
  361.         ANS="y"
  362.             DEFAULT=1 ;;
  363.         -f) Pre=1 ;;
  364.         *)  echo USAGE : $USAGE
  365.         exit 1;;
  366.         esac
  367.     done
  368. fi
  369.  
  370. # Prompt user for device name
  371. while [ "$TAPE_LOC" =  "" ]
  372. do
  373.     if [ $REMOTE -eq 0 ]
  374.     then
  375.     if [ $DEFAULT -eq 0 -a $Pre -eq 0 ]
  376.     then
  377.         while [ "$TAPE_LOC" = "" ]
  378.         do
  379.         echo
  380.         echo -n "Enter media drive location (local | remote): "
  381.         stdin_log TAPE_LOC
  382.         done
  383.     else
  384.         TAPE_LOC="local"
  385.     fi
  386.     else
  387.     TAPE_LOC="remote"
  388.     fi
  389.         case "$TAPE_LOC" in 
  390.     r*)     while [ "$REMOTE_HOST" = "" ]
  391.         do
  392.             echo 
  393.             echo -n "Enter hostname of remote drive: "
  394.             stdin_log REMOTE_HOST
  395.         done
  396.         REMOTE=1
  397. #               Test to see if remote host responds
  398.         rsh  -n $REMOTE_HOST "echo 0 > /dev/null"
  399.         if [ "$?" -ne 0 ]
  400.         then
  401.             echo "$SH_NAME : Problem with reaching remote host $REMOTE_HOST"
  402.             exit 1
  403.         fi;;
  404.     l*) ;;
  405.     *)   echo
  406.          echo "$SH_NAME : Incorrect response, use \"local\" or \"remote\""
  407.          TAPE_LOC="" ;;
  408.     esac
  409. done
  410. #  if the device was not specified in the argument line or as "default".
  411. if [ $DEV_SPEC -eq 0 ]
  412. then
  413. #   This one will loop until a correct device is chosen.
  414.     while [ "$DEVROOT" = "" ] 
  415.     do
  416.     echo ""
  417.     echo -n "Enter Device Name (e.g. sr0, st0, mt0, fd0c, mounted ) : "
  418.     stdin_log DEVROOT
  419.     case  "$DEVROOT" in
  420.         st*) OPTIONS="xvfbp"
  421.           BS=126;;
  422.         mt*) OPTIONS="xvfbp"
  423.           BS=20;;
  424.         fd*) if [ $REMOTE -eq 1 ]
  425.                   then
  426.                        echo "$SH_NAME : Remote option cannot be used with diskette installation"
  427.                        exit 1
  428.                   fi
  429.           OPTIONS="xvfbpTZ"
  430.           BS="18"
  431.           DISK=1;;
  432.         ar*) OPTIONS="xvfbp"
  433.           BS=126;;
  434.             mo*) if [ $REMOTE -eq 1 ]
  435.                   then
  436.                       echo "$SH_NAME: Remote option invalid for CD-ROM installation." 
  437.                       echo "Please mount device locally"
  438.                       exit 1
  439.                   fi
  440.                   OPTIONS="xvfp"
  441.                   DEVICEISMOUNTED=1;;
  442.             sr*) if [ $REMOTE -eq 1 ]
  443.                   then
  444.                       echo "$SH_NAME: Remote option invalid for CD-ROM installation." 
  445.                       echo "Please mount device locally"
  446.                       exit 1
  447.                   fi
  448.                   OPTIONS="xvfp"
  449.                   CDROM=1;;
  450.         *)    echo "$SH_NAME : Invalid device name $DEVROOT"
  451.           DEVROOT="";;
  452.     esac
  453.     done
  454. else
  455. #   This one will exit if an incorrect device is chosen.
  456.     case  "$DEVROOT" in 
  457.         st*)   OPTIONS="xvfbp"
  458.                   BS=126;;
  459.         mt*)   OPTIONS="xvfbp"
  460.               BS=20;;
  461.         fd*)   if [ $REMOTE -eq 1 ]
  462.                 then
  463.                         echo "$SH_NAME : Remote option cannot be used with diskette installation"
  464.                         exit 1
  465.                 fi
  466.         OPTIONS="xvfbpTZ"
  467.               BS="18"
  468.         DISK=1;;
  469.         ar*)   OPTIONS="xvfbp"
  470.               BS=126;;
  471.         mo*) if [ $REMOTE -eq 1 ]
  472.               then
  473.                 echo "$SH_NAME: Remote option invalid for CD-ROM installation."                echo "Please mount device locally"
  474.                 exit 1
  475.               fi
  476.               OPTIONS="xvfp"
  477.              DEVICEISMOUNTED=1;;
  478.        sr*) if [ $REMOTE -eq 1 ]
  479.              then
  480.                 echo "$SH_NAME: Remote option invalid for CD-ROM installation."                echo "Please mount device locally"
  481.                 exit 1
  482.              fi
  483.                   OPTIONS="xvfp"
  484.                   CDROM=1;;
  485.     esac
  486. fi
  487. # if the front-end "extract_unbundled" hasn't been run do the following
  488. if [ $DEVICEISMOUNTED -eq 0 ]
  489. then
  490.         if [ $CDROM -eq 1 ]
  491.         then
  492.                 DEVPATH="/dev/${DEVROOT}"
  493.         elif [ $DISK -eq 1 ]
  494.         then
  495.                 DEVPATH="/dev/r${DEVROOT}"
  496.         else
  497.                 DEVPATH="/dev/nr${DEVROOT}"
  498.         fi
  499.  
  500.     if [ $Pre -eq 0 ]
  501.     then
  502.         echo ""
  503.         echo "** Please mount the release media if you haven't done so already. **"
  504.         if [ $DEFAULT -eq 0 ]
  505.         then 
  506.             echo
  507.             echo -n "Press return when ready:"
  508.             read ans
  509.         fi
  510. # Wait for media to load.
  511.         sleep 8
  512. # For Tape devices only since diskettes cannot be used remotely
  513. # Rewind tape, just to be sure
  514.     fi
  515. fi
  516. if [ $DEV_MP -eq 0 ]
  517. then
  518.    if [ \( $DEVICEISMOUNTED -eq 1 \) -o \( $CDROM -eq 1 \) ]
  519.    then
  520. ###Check if user wants to use default mount point
  521.  
  522.         if [ -n "$CDINSTALLDIR" ]
  523.         then
  524.                 ans=""
  525.                 echo
  526.                 echo -n "OK to use default mount point - $CDINSTALLDIR [y|n]? "
  527.                         read ans
  528.                         if [ $ans = "y" ]
  529.                         then
  530.                                 MOUNT_POINT=$CDINSTALLDIR
  531.                         else
  532.                                 CDINSTALLDIR=""
  533.                         fi
  534.         fi
  535.         if [ -z "$CDINSTALLDIR" ]
  536.         then
  537. ####### Ask the user for the CD-ROM mount point.
  538.  
  539.                 echo
  540.                 echo -n "Please enter mount point [e.g. /cdrom]: "
  541.                 read MOUNT_POINT
  542.         fi
  543. ####### Check existence of mount point.
  544.  
  545.         if [ ! -d "$MOUNT_POINT" ]
  546.         then
  547.  
  548. ### if mount point doesn't exist but user says device is mounted, there
  549. ### is definitely a problem - exit
  550.  
  551.                 if [ $DEVICEISMOUNTED -eq 1 ]
  552.                 then
  553.                         echo
  554.                         echo "$0: Device specified as mounted, but mount point is nonexistent, exiting"
  555.                         exit 1
  556.                 fi
  557. ### If the mount point doesn't exist, no need to ask if device is
  558. ### mounted later on
  559.  
  560.                 askmount=0
  561.                 mkdir -p  $MOUNT_POINT
  562.                 if [ $? -ne 0 ]
  563.                 then
  564.                         echo
  565.                         echo "$0 : Error making mount point, exiting"
  566.                         exit 1
  567.                 fi
  568.         else
  569.                 askmount=1
  570.         fi
  571. ####### Mount CD-ROM if needed.
  572.         if [ $DEVICEISMOUNTED -eq 0 ]
  573.         then
  574.                 if [ $askmount -eq 1 ]
  575.                 then
  576.                         ans=""
  577.                         echo
  578.                         echo -n "Is CD-ROM already mounted [y|n]? "
  579.                         read ans
  580.                 else
  581.                         ans="n"
  582.                 fi
  583.                 if [ $ans = "n" ]
  584.                 then
  585.                         PROGMOUNTEDDEVICE=1
  586.                         /etc/mount -r $DEVPATH $MOUNT_POINT 2> /dev/null
  587.                         if [ $? -ne 0 ]
  588.                         then
  589.                                 echo
  590.                                 echo "$0 : Error mounting CD-ROM, exiting"
  591.                                 exit 1
  592.                         fi
  593.                 fi
  594.         fi
  595.         DEV_MP=1
  596.         DEVICEISMOUNTED=1
  597.    fi
  598. fi
  599. if [ $Pre -eq 0 ]
  600. then
  601.         if [ $DEV_MP -eq 0 ]
  602.         then
  603.  
  604.         if [ $REMOTE -eq 1 ]
  605.         then
  606.                 stat=""
  607.             stat=`rsh -n ${REMOTE_HOST} "$MT -f ${DEVPATH} rew; echo \\$status"`
  608.             case $stat in
  609.                 [1-9]* | 1[0-9]* )
  610.                     echo
  611.                     echo "$SH_NAME : Problem with accessing tape drive, exiting"
  612.                     exit 1;;
  613.                 *)      continue;;    
  614.             esac
  615.         else
  616.                   if [ $DISK -eq 0 ]
  617.                     then
  618.                     $MT -f ${DEVPATH} rew
  619.                      if [ "$?" -ne  0 ]
  620.                     then
  621.                         echo
  622.                         echo "$SH_NAME : Problem with accessing tape drive, exiting"
  623.                          exit 1
  624.                      fi
  625.                     fi
  626.              fi
  627.     fi
  628.     # Print copyright to the screen for further verification
  629.     clear
  630.     echo "The following product will be installed:"
  631.         if [ $DEV_MP -eq 0 ]
  632.         then
  633.         if [ $REMOTE -eq 1 ]
  634.         then
  635.                 rsh -n ${REMOTE_HOST} $DD if=${DEVPATH} > /tmp/cp.tmp
  636.                 if [ "$?" -ne 0 ]
  637.                 then
  638.                 echo
  639.                 echo $SH_NAME : Problem with reading copyright file on release tape.
  640.                 exit 1
  641.                 fi
  642.                 cat /tmp/cp.tmp | more 
  643.             else
  644.                 if [ $DISK -eq 0 ]
  645.                     then 
  646.                 echo " $DD if=${DEVPATH} > /tmp/cp.tmp"
  647.                 $DD if=${DEVPATH} > /tmp/cp.tmp
  648.                 if [ "$?" -ne 0 ]
  649.                 then
  650.                     echo
  651.                     echo $SH_NAME : Problem with reading copyright file on release tape.
  652.                     exit 1
  653.                 fi
  654.                 cat /tmp/cp.tmp  | more 
  655.                 else
  656.                     $BAR ${OPTIONS} ${DEVPATH} ${BS} +install/copyright.d > /dev/null
  657.                         if [ "$?" -ne 0 ]
  658.                         then
  659.                                 echo $0 : Problem with reading copyright file on release tape.
  660.                                 exit 1
  661.                         fi                           
  662.                         cat +install/copyright.d  | more 
  663.                 \cp +install/copyright.d /tmp/cp.tmp
  664.                 \rm -rf +install
  665.                     fi    
  666.         fi
  667.         else
  668.                 more $MOUNT_POINT/$PRODUCT_NAME/_install/copyright.r
  669.                 if [ $? -ne 0 ]
  670.                 then
  671.                         echo
  672.                         echo "$SH_NAME : Problem accessing media, exiting"
  673.                         if [ $PROGMOUNTEDDEVICE=1 ]
  674.                         then
  675.                                 /etc/umount $MOUNT_POINT 2>/dev/null
  676.                                 if [ $? -ne 0 ]
  677.                                 then
  678.                                         echo
  679.                                         echo $0: Problem unmounting device
  680.                                 fi
  681.                         fi
  682.                         exit 1
  683.                 fi
  684.         fi
  685.  
  686.     while [ "$ANS" = "" ]
  687.     do
  688.         echo
  689.         echo -n "Do you want to continue [y|n]? "
  690.         stdin_log ANS
  691.         echo ""
  692.         case $ANS in
  693.         y*)  continue;;
  694.         n*)  echo $SH_NAME : Terminating installation...
  695.              exit 0;;
  696.         *)   
  697.              echo 
  698.              echo "Enter \"y\" or \"n\""
  699.              ANS="";;
  700.         esac
  701.     done
  702. fi
  703. #check for correct login for installation
  704. #
  705. case "$REQ_LOGIN" in
  706.     "$INSTALLER" | none)
  707.         ;; 
  708.     *) echo
  709.        echo "$SH_NAME : Incorrect login for installation, you must be $REQ_LOGIN"
  710.        \rm -f /tmp/cp.tmp
  711.           exit 1 ;;
  712. esac
  713. ####################################
  714. #  Display Informational Lists :   #
  715. ####################################
  716. if [ $DEFAULT -eq 0 ]
  717. then
  718.     answer=""
  719.     while [ "$answer" = "" ]
  720.     do
  721.         echo ""
  722.         echo -n "Do you want to see a description of this installation script [y|n]? "
  723.         stdin_log answer
  724.         case $answer in
  725.             y* ) echo ""
  726.              echo "$SCRIPT_DESC"
  727.              echo "";;
  728.             n* ) continue;;
  729.             * )  
  730.              echo 
  731.              echo "Enter \"y\" or \"n\""
  732.              answer="";;
  733.         esac
  734.     done
  735. #
  736. # remove any or all of the following 4 displays, if not applicable
  737. #
  738.     echo "The following are Software Requirements for $PRODUCT_NAME:"
  739.     echo "          $SOFT_REQ"
  740.     echo "The following are Hardware Requirements for $PRODUCT_NAME:"
  741.     echo "          $HARD_REQ"
  742.     echo "The following are Optional Software for $PRODUCT_NAME:"
  743.     echo "          $SOFT_OPT"
  744.     echo "The following are Optional Hardware for $PRODUCT_NAME:"
  745.     echo "          $HARD_OPT"
  746.  
  747.     echo ""
  748.     echo "Installation should take approximately $INSTALL_TIME."
  749.     echo ""
  750. ###################################
  751. # Display disk usage information  #
  752. ###################################
  753.     echo ""
  754.     echo "Here is the Current Free Disk space:"
  755.         df | egrep '(/dev|Filesystem)'
  756.     echo ""
  757.     echo "This software requires $SOFT_SIZE kbytes of disk space"
  758.     answer=""
  759.     while [ "$answer" = "" ]
  760.     do
  761.         echo ""
  762.         echo -n "Do you want to continue [y|n]? "
  763.         stdin_log answer
  764.         case $answer in
  765.         y* ) continue;;
  766.         n* ) echo "$SH_NAME : Exiting..."
  767.              \rm -f /tmp/cp.tmp
  768.              exit 0;;
  769.         * ) 
  770.              echo 
  771.              echo "Enter \"y\" or \"n\""
  772.              answer="";;
  773.         esac
  774.     done
  775. fi
  776. ###################################################
  777. # Check the OS level compatibility (if necessary) #
  778. # Comment out this section if future OS           #
  779. # compatability is unknown.              #
  780. ###################################################
  781. for SOS in $SOS_COMPAT
  782. do
  783.     case $SOS_LEVEL in
  784.                 ${SOS}* )
  785. # match found
  786.                         SOS_ok=0
  787.                         break;;
  788.                 * )
  789. # no match found
  790.                         SOS_ok=1;;
  791.         esac
  792. done
  793.         
  794. # no match was found
  795. if [ $SOS_ok -eq 1 ]
  796. then
  797.     echo ""
  798.     echo "$SH_NAME : This software is not compatible with the current operating system"
  799.     echo ""
  800.     echo "     This is the list of compatible operating systems:"
  801.     for SOS in $SOS_COMPAT
  802.     do
  803.         echo "         $SOS"
  804.     done
  805.     \rm -f /tmp/cp.tmp
  806.     exit 1
  807. fi
  808.  
  809. ################################### 
  810. # Architecture Compatibility Test #
  811. ###################################
  812. # no match found (not compatible)
  813. ARCH_not_ok=true
  814. for archtype in $ARCH_COMPAT
  815. do
  816.     case $ARCH in
  817.                 ${archtype})
  818.             # match found
  819.                         ARCH_not_ok=false
  820.             break
  821.             ;;
  822.         esac
  823. done
  824.  
  825. ####################################################
  826. #  Set up for Standalone or Server installation    #
  827. ###################################################
  828. DEST_LIST=""
  829. MACHINE=""
  830. heter="n"
  831. ###########################################################
  832. # Set up default values if this was run in -DEFAULT mode. #
  833. ###########################################################
  834. if [ $DEFAULT -eq 1 ]
  835. then
  836.     if  ${ARCH_not_ok}
  837.     then
  838.         echo ""
  839.         echo "$SH_NAME : This software is not compatible with the $ARCH architecture"
  840.             echo ""
  841.             echo "     This a list of compatible architectures:"
  842.             for archtype in $ARCH_COMPAT
  843.             do
  844.                        echo "         $archtype"
  845.             done
  846.         \rm -f /tmp/cp.tmp
  847.             exit 1
  848.     fi
  849.     MACHINE="standalone"
  850.     DEST_LIST=$DESTDIR
  851. fi
  852. while [ "$MACHINE" = "" ] 
  853. do
  854.     echo ""
  855.     echo -n "Enter system type [standalone | server]: "
  856.     stdin_log MACHINE
  857.     case "$MACHINE" in
  858.     st* )
  859.     if  ${ARCH_not_ok}
  860.     then
  861.         echo ""
  862.         echo "$SH_NAME : This software is not compatible with the $ARCH architecture"
  863.             echo ""
  864.             echo "     This a list of compatible architectures:"
  865.             for archtype in $ARCH_COMPAT
  866.             do
  867.                        echo "         $archtype"
  868.             done
  869.         \rm -f /tmp/cp.tmp
  870.             exit 1
  871.     fi
  872.     space_test $DESTDIR
  873.     DEST_LIST=$DESTDIR
  874.         STANDALONE="Y" ;;
  875.     se* )
  876.      servertype=""
  877.          while [ "$servertype" = "" ]
  878.      do
  879.              echo
  880.              echo -n "Enter server type [homo | heter]: "
  881.              stdin_log servertype
  882.              case "$servertype" in
  883.                ho* )
  884.             if ${ARCH_not_ok}
  885.             then
  886.                 echo ""
  887.             echo "$SH_NAME : This software is not compatible with the $ARCH architecture"
  888.                 echo ""
  889.             echo "     This a list of compatible architectures:"
  890.             for archtype in $ARCH_COMPAT
  891.             do
  892.                 echo "         $archtype"
  893.             done
  894.             \rm  -f /tmp/cp.tmp
  895.             exit 1
  896.             fi
  897.             space_test $DESTDIR
  898.               DEST_LIST=$DESTDIR
  899.                     break ;;
  900.                he* )
  901.             heter="y";;
  902.         *)
  903.             echo ""
  904.                     echo "$SH_NAME: Invalid server type \"${servertype}\"."
  905.             echo ""
  906.                     echo "Enter \"homo\" or \"heter\""
  907.             servertype="";;
  908.              esac
  909.          done;;
  910.      * )  
  911.     echo
  912.     echo "$SH_NAME : Invalid system type, use \"standalone\" or \"server\""
  913.     MACHINE="" ;;
  914.     esac
  915. done
  916. ######################################################################
  917. #  Set up correct Destination Directories for Heterogeneous servers. #
  918. #  Assuming the machine is configured to be a server already         #
  919. ######################################################################
  920. # Greater than 4.0, means it will go in /export/exec/sun2|3|4
  921. if [ $heter = "y" ]
  922. then
  923.     if [ "$SOS_LEVEL" = "Sys4" -o $SOS_NUMERIC -lt 40 ]
  924.     then 
  925.      . ${install_dir}/3.x_install
  926.     else
  927.     for client in $ARCH_COMPAT
  928.     do
  929.     answer=""
  930.     while [ "$answer" = "" ]
  931.     do
  932.         echo ""
  933.         echo -n "Will this be for a $client client [y|n]? "
  934.         stdin_log answer
  935.         case "$answer" in
  936.           y* )
  937.             DESTDIR="/export/exec/$client"
  938.             if [ ! -d "$DESTDIR" ]
  939.             then
  940.                 echo ""
  941.                 echo "$SH_NAME : Directory $DESTDIR does not exist"
  942.                 echo ""
  943.                 echo "    This machine does not have a standard server"
  944.                 echo "     configuration for a $client client."
  945.                 echo ""
  946.                 echo "    You can either"
  947.                 echo "    restart for \"standalone\" installation"
  948.                 echo "    or"
  949.                 echo "    make the partition and directory for $DESTDIR"
  950.                 echo "    then restart for \"server\" installation."
  951.                 echo ""
  952.                     echo "$SH_NAME : Terminating..."
  953.                 \rm  -f /tmp/cp.tmp
  954.                 exit 0
  955.             fi
  956.             space_test $DESTDIR
  957.             DEST_LIST="$DEST_LIST $DESTDIR";;
  958.           n* )
  959.             continue;;
  960.           * )
  961.             echo
  962.             echo "Enter \"y\" or \"n\""
  963.             answer="";;
  964.         esac
  965.         done
  966.     done
  967.     fi
  968. # If no client was selected default to standalone installation to $DESTDIR
  969.     if [ "$DEST_LIST" = "" ]
  970.     then
  971.     answer=""
  972.     while [ "$answer" = "" ]
  973.     do
  974.         echo ""
  975.         echo "No client was selected, installation will default to directory $DESTDIR"
  976.           echo -n "Do you want to continue [y|n]? "
  977.         stdin_log answer
  978.         case "$answer" in
  979.          y* )
  980.             space_test $DESTDIR
  981.             DEST_LIST="$DESTDIR";;
  982.          n* )
  983.             echo $SH_NAME : Terminating installation...
  984.             \rm  -f /tmp/cp.tmp
  985.                    exit 0;;
  986.          * )
  987.             echo ""
  988.             echo "Enter \"y\" or\"n\""
  989.             answer="";;
  990.         esac
  991.     done
  992.     fi
  993. fi
  994. ######################################################################
  995. #  if Destination directory is changeable and this is a standalone   #
  996. #  installation.  Set up for new Destination directory.              #
  997. ######################################################################
  998. if [ $DEST_SETABLE = "Y"  -a $STANDALONE = "Y" ]
  999. then
  1000.     answer=""
  1001.     while [ "$answer" = "" ]
  1002.     do
  1003.         echo ""
  1004.         echo "Currently the destination directory is $DEST_LIST"
  1005.         echo "Currently there is $DISK_AVAIL kbytes available in the $DEST_LIST partition"
  1006.         echo -n "Do you want to change the destination directory [y|n]? "
  1007.         stdin_log answer
  1008.         case $answer in
  1009.         y*)
  1010.         echo ""
  1011.             echo "These are the available partitions and free disk space:"
  1012.         df | egrep /dev | awk '{print "    " $6 "    " $4}'
  1013.         partition=""
  1014.         while [ "$partition" = "" ]
  1015.         do
  1016.             echo ""
  1017.             echo -n "Enter the partition you would like the software installed in: "
  1018.             stdin_log DESTDIR
  1019.             tmp=`df $DESTDIR 2>/dev/null | egrep /dev`
  1020.                 if [ "$?" -ne 0 ]
  1021.             then
  1022.             echo
  1023.                echo "$SH_NAME : Nonexistent partition $partition"
  1024.                partition=""
  1025.             else
  1026.             space_test $DESTDIR
  1027.             echo
  1028.                            echo -n "Enter the destination directory for the product: $DESTDIR"
  1029.                            stdin_log new_destdir
  1030.                        if [ -d "$DESTDIR$new_destdir" ]
  1031.                            then
  1032.                             DEST_LIST="$DESTDIR$new_destdir"
  1033.             else
  1034.                 answer=""
  1035.                 while [ "$answer" = "" ]
  1036.                 do
  1037.                     echo
  1038.                     echo  "$DESTDIR$new_destdir does not exist;"
  1039.                     echo -n "do you want to create that directory [y|n]? "
  1040.                     stdin_log answer
  1041.                 case $answer in
  1042.                         y*)
  1043.                                        mkdir -p $DESTDIR$new_destdir
  1044.                                 if [ "$?" -ne 0 ]
  1045.                             then
  1046.                          echo
  1047.                                      echo "$SH_NAME : Failed to create destination directory, check permissions: $DESTDIR$new_destdir"
  1048.                      \rm  -f /tmp/cp.tmp
  1049.                          exit 1
  1050.                     fi
  1051.                                        DEST_LIST="$DESTDIR$new_destdir";;
  1052.                         n*)
  1053.                      new_destdir="";;
  1054.                 *)  echo
  1055.                     echo "$SH_NAME : Enter \"y\" or \"n\""
  1056.                     answer="";;
  1057.                 esac
  1058.                 done
  1059.             fi
  1060.             fi
  1061.         done;;
  1062.     n*) continue;;
  1063.     *)  echo
  1064.         echo "Enter \"y\" or \"n\""
  1065.         answer="";;
  1066.     esac
  1067.     done
  1068. fi
  1069. ####################################
  1070. #  Finally, tar off the software   #
  1071. ####################################
  1072. for dest_dir in $DEST_LIST
  1073. do
  1074.     if [ $DEFAULT -eq 0 ]
  1075.     then
  1076. # Test for pre-existent version of software
  1077.         if [ -d "$dest_dir/$SOFT_PRETEST" -o -f "$dest_dir/$SOFT_PRETEST" ]
  1078.  
  1079.         then
  1080.                 answer=""
  1081.                 while [ "$answer" = "" ]
  1082.                 do
  1083.                     echo
  1084.                     echo "There is pre-existing version of this software." 
  1085.                     echo -n "Do you want to overwrite [y|n]? "
  1086.                     stdin_log answer
  1087.                     case $answer in
  1088.                        y*) continue;;
  1089.                        n*)
  1090.                            echo ""
  1091.                            echo "$SH_NAME : Terminating Installation"
  1092.                            echo ""
  1093.                            \rm  -f /tmp/cp.tmp
  1094.                            exit 0;;
  1095.                        *)
  1096.                            echo
  1097.                            echo "Enter \"y\" or \"n\""
  1098.                            ANS="";;
  1099.                     esac
  1100.                 done
  1101.         fi
  1102.     echo "Ready to install $PRODUCT_NAME in $dest_dir,"
  1103.     ANS=""
  1104.     while [ "$ANS" = "" ]
  1105.     do
  1106.         echo
  1107.         echo -n "Do you want to continue [y|n]? "
  1108.         stdin_log ANS
  1109.         echo ""
  1110.         case $ANS in
  1111.         y*) continue;;
  1112.         n*) 
  1113.             echo
  1114.             echo "$SH_NAME : Terminating Installation"
  1115.                 exit 0;;
  1116.         *)  
  1117.             echo
  1118.             echo "Enter \"y\" or \"n\""
  1119.             ANS="";;
  1120.         esac
  1121.     done
  1122.     fi
  1123. # change to the DESTDIRectory and tar off the files
  1124. #
  1125.     cd $dest_dir
  1126. ### special for Sun386i, mount /usr with write permission ###
  1127. #    $MAKE_DIR_RW
  1128.     if [ $DEV_MP -eq 0 ]
  1129.     then
  1130.     if [ $REMOTE -eq 1 ]
  1131.     then
  1132.         stat=""
  1133.         stat=`rsh -n $REMOTE_HOST "$MT -f $DEVPATH rew; echo \\$status"`
  1134.         stat=`rsh -n $REMOTE_HOST "$MT -f $DEVPATH fsf 2; echo \\$status"`
  1135.         if [ "$stat" = "1" ]
  1136.             then
  1137.                    echo "$SH_NAME : Error in Extracting Software.  Check Tape."
  1138.                         \rm  -f /tmp/cp.tmp
  1139.                 exit 1
  1140.         fi
  1141.         echo "Extracting software... "
  1142.             rsh -n $REMOTE_HOST $DD if=$DEVPATH bs=${BS}b | ${TAR} xBvfbp - ${BS}
  1143.         if [ "$?" -ne 0 ]
  1144.             then
  1145.                    echo "$SH_NAME : Error in Extracting Software.  Check Tape."
  1146.                         \rm  -f /tmp/cp.tmp
  1147.                 exit 1
  1148.         fi
  1149.     else
  1150.         if [ $DISK -eq 0 ]
  1151.         then
  1152.         $MT -f $DEVPATH rew
  1153.         $MT -f $DEVPATH fsf 2
  1154.         echo "Extracting software... "
  1155.         $TAR $OPTIONS $DEVPATH $BS
  1156.         if [ "$?" -ne 0 ]
  1157.         then
  1158.                    echo "$SH_NAME : Error in Extracting Software.  Check Tape."
  1159.                     $MT -f $DEVPATH rewind
  1160.                         \rm  -f /tmp/cp.tmp
  1161.                 exit 1
  1162.         fi
  1163.         else
  1164.         $BAR ${OPTIONS} ${DEVPATH} ${BS}
  1165.                 if [ "$?" -ne 0 ]
  1166.                 then
  1167.                         echo
  1168.                         echo $0 : Error in Extracting Software.  Check the media.
  1169.             \rm  -f /tmp/cp.tmp
  1170.                         exit 1
  1171.                 fi
  1172.         \rm -rf +install
  1173.         fi
  1174.     fi
  1175.     else
  1176. ###############################################################
  1177. #CD-ROM installation########################################
  1178. # Use either tar or cp to transfer all or a subset of your 
  1179. # product's files from the CD to the users hard disk
  1180. ###############################################################
  1181. #cp -r $MOUNT_POINT/$PRODUCT_NAME/bin/* .
  1182.  
  1183. # tar command if needed instead of cp to preserve symlinks
  1184.  
  1185.  ### cd $MOUNT_POINT/$PRODUCT_NAME; tar vcf - . | (cd  $dest_dir; tar xvpfB -)
  1186.  # use command below to copy everything including the +install directory
  1187.  # even when installing from cdrom or via NFS mount point.  normally,
  1188.  # the tar command above would be used to just install the product to
  1189.  # the customers destdir
  1190.  
  1191.  cd $MOUNT_POINT; tar vcf - . | (cd  $dest_dir; tar xvpfB -)
  1192.  
  1193.  
  1194.         if [ "$?" -ne 0 ]
  1195.         then
  1196.                 echo "$SH_NAME : Error in Extracting Software."
  1197.                 exit 1
  1198.         fi
  1199.     fi
  1200. done
  1201. ########################################################################
  1202. # Optional Software : May or may not apply                       #
  1203. #   If it exists optional software will be the third file on the tape. #
  1204. #   Cannot be used with diskettes since optional software cannot be    #
  1205. #   separated on the diskette.                           #
  1206. ########################################################################
  1207. if [ "$OPT_REL" = "Y" ]
  1208. then
  1209.     if [ $DEFAULT -eq 0 ]
  1210.     then
  1211.     . ${install_dir}/Opt_software
  1212.     fi
  1213. fi
  1214.  
  1215. ##############################################################
  1216. # Log Languages Software installation in /usr/lib/lang_info. #
  1217. ##############################################################
  1218. for install_dir in $DEST_LIST
  1219. do
  1220.     case "$PROD_NAME" in
  1221.     c | lint | pascal | fortran | modula2 )
  1222.         TAB="   "
  1223.         LANG_INFO=$install_dir/lib/lang_info
  1224.         # make an installation log entry in the /usr/lib/lang_info file.
  1225.  
  1226.         if [ ! -f ${LANG_INFO} ]
  1227.         then
  1228.                 echo "****${TAB}Installing on a pre-4.0FCS system;"
  1229.                 echo "${TAB}${LANG_INFO} is not present."
  1230.                 echo "${TAB}Installation aborted."
  1231.         \rm  -f /tmp/cp.tmp
  1232.                 exit 1
  1233.         fi
  1234.  
  1235.         if [ ! -w ${LANG_INFO} ]
  1236.         then
  1237.                 echo "****${TAB}${LANG_INFO} is not writable."
  1238.                 echo "${TAB}Installation aborted."
  1239.         \rm  -f /tmp/cp.tmp
  1240.                 exit 1
  1241.         fi
  1242.  
  1243.     ex - ${LANG_INFO} <<-!EOF
  1244.         g/^${PROD_NAME}${TAB}/d
  1245.         \$a
  1246.         ${PROD_NAME}${TAB}${PROD_RELEASE}${TAB}${PROD_BASE_SOS_RELEASE}
  1247.         .
  1248.         wq
  1249.         !EOF
  1250.     ;;
  1251.  
  1252.     * )
  1253.     # nothing to do here.
  1254.     ;;
  1255.     esac
  1256. done
  1257.  
  1258. if [ $DEV_MP -eq 0 ]
  1259. then
  1260.  
  1261.  
  1262.     if [ $DISK -eq 0 ]
  1263.     then
  1264.             if [ $REMOTE -eq 1 ]
  1265.             then
  1266.             echo "$SH_NAME : rewinding tape..."
  1267.             stat=""
  1268.                 stat=`rsh -n $REMOTE_HOST "$MT -f $DEVPATH rew; echo \\$status"`
  1269.             case $stat in
  1270.                        [1-9]* | 1[0-9]* )
  1271.                                echo "$SH_NAME : Error in tape rewind."
  1272.                                exit 1;;
  1273.                        *)      continue;;
  1274.                 esac
  1275.             else
  1276.             echo "$SH_NAME : rewinding tape..."
  1277.             $MT -f $DEVPATH rew
  1278.             if [ "$?" -ne 0 ] 
  1279.             then
  1280.                     echo "$SH_NAME : Error in tape rewind."
  1281.                 exit 1
  1282.             fi
  1283.             fi
  1284.     fi
  1285. fi
  1286. #####################################################
  1287. # Log the Software release in the  Inventory list   # 
  1288. #####################################################
  1289. echo ----------------------------------- >> $UNBUNDLED_INVENTORY
  1290. date >> $UNBUNDLED_INVENTORY
  1291. if [ -f /tmp/cp.tmp ]
  1292. then
  1293.     head -5 /tmp/cp.tmp >> $UNBUNDLED_INVENTORY
  1294.     if [ "$?" -ne 0 ] 
  1295.     then
  1296.         echo "$SH_NAME : Error in logging software inventory"
  1297.         exit 1
  1298.     fi
  1299. else # this is for the old style 1.X version of extract_unbundled #
  1300.     if [ $DEV_MP -eq 0 ]
  1301.     then
  1302. # grab only the first part of copyright file w/o copyright info
  1303.             if [ $REMOTE -eq 1 ]
  1304.             then
  1305.                 rsh -n $REMOTE_HOST "$DD if=$DEVPATH" >> $UNBUNDLED_INVENTORY
  1306.                 stat=`rsh -n $REMOTE_HOST "$MT -f $DEVPATH rew; echo \\$status"`
  1307.                 case $stat in
  1308.                     [1-9]* | 1[0-9]* )
  1309.                             echo "$SH_NAME : Error in logging software inventory"
  1310.                             exit 1;;
  1311.                     *)      continue;;
  1312.                 esac
  1313.             else
  1314.                 $DD if=$DEVPATH >> $UNBUNDLED_INVENTORY
  1315.                 if [ "$?" -ne 0 ]
  1316.                 then
  1317.                         echo "$SH_NAME : Error in logging software inventory"
  1318.                         exit 1
  1319.                 fi
  1320.             fi
  1321.     fi
  1322. fi
  1323.  
  1324. \rm -f /tmp/cp.tmp
  1325. # work-around to free up the /tmp space used when uncompressing files with
  1326. # the bar command.
  1327. \rm -f /tmp/tmp_*.Z
  1328. ##########################################
  1329. #  Log the installation entry and end.   #
  1330. ##########################################
  1331. echo "$PROD Installation Complete" >> $LOGFILE
  1332. echo "$SH_NAME : **** Installation Completed ****"
  1333.